package com.example.barcodeapp.adapter.ownadapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.barcodeapp.R;

public class AdapterGongKaiKe extends RecyclerView.Adapter<AdapterGongKaiKe.ViewHolder> {
    Context context;

    public AdapterGongKaiKe(Context context) {
        this.context = context;
    }

    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View inflate = LayoutInflater.from(context).inflate(R.layout.adapter_gongkaike, parent, false);
        return new ViewHolder(inflate);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {

    }

    @Override
    public int getItemCount() {
        return 10;
    }



    public class ViewHolder extends RecyclerView.ViewHolder {

        private ImageView gongkaikeImgImg;
        private TextView gongkaikeName;
        private TextView gongkaikeNeirong;
        private TextView gongkaikeTianshu;
        private TextView gongkaikeJiage;
        private TextView gongkaikeTvChakan;
        public ViewHolder(@NonNull View itemView) {
            super(itemView);
            gongkaikeImgImg = (ImageView) itemView.findViewById(R.id.gongkaike_img_img);
            gongkaikeName = (TextView) itemView.findViewById(R.id.gongkaike_name);
            gongkaikeNeirong = (TextView) itemView.findViewById(R.id.gongkaike_neirong);
            gongkaikeTianshu = (TextView) itemView.findViewById(R.id.gongkaike_tianshu);
            gongkaikeJiage = (TextView) itemView.findViewById(R.id.gongkaike_jiage);
            gongkaikeTvChakan = (TextView) itemView.findViewById(R.id.gongkaike_tv_chakan);
        }
    }
}
